# $Id: PKGBUILD 57791 2011-11-02 20:30:29Z lfleischer $
# Maintainer: Lukas Fleischer <archlinux at cryptocrack dot de>
# Contributor: Juergen Hoetzel <juergen@archlinux.org>
# Contributor: Rouslan Solomakhin <rouslan@localnet.com>

pkgname=prelink
pkgver=20111012
pkgrel=1
pkgdesc='ELF prelinking utility to speed up dynamic linking.'
arch=('i686' 'x86_64')
url='http://people.redhat.com/jakub/prelink/'
license=('GPL')
depends=('elfutils')
backup=('etc/prelink.conf')
md5sums=('f5aaf347432d677c293e5e3399ba4fdf'
         '0793ed49e9b31c125cba4d936c333cf6'
         'b347580536e078b34c547742d36a3e9d')
source=("http://people.redhat.com/jakub/prelink/${pkgname}-${pkgver}.tar.bz2"
        'prelink.conf'
        'arch-x86_64-dynamic_linker.patch')

build() {
  cd "${srcdir}/${pkgname}"

  patch -Np0 -i ../arch-x86_64-dynamic_linker.patch

  ./configure --prefix=/usr --mandir=/usr/share/man
  make
}

package() {
  cd "${srcdir}/${pkgname}"

  make DESTDIR="${pkgdir}" install
  install -Dm0644 "${srcdir}/prelink.conf" "${pkgdir}/etc/prelink.conf"
}
